Types are the foundation of Xconq game designs. Nearly all the rules and game parameters are associated with the unit, material, and terrain types. There is no sort of type hierarchy; instead, most forms allow sets of types to be used in the place of single types.
Each type has an index associated with it, starting from 0. This index never appears directly, and cannot be set. This does mean that types have an order, so the order in which types are defined is sometimes significant. These cases will be noted. The order is always the order in which the types appear in the file.
The names of types need not be distinct from each other, but you run the risk of player confusion if they share names.
TypeProperty: name
string
This property is the specific name of the type. This name will be
displayed to players; the exact format is up to the interface, but will
typically depend on the name's length and the space available in the
display. If no type names have been defined, the internal type name
(see below) will be used. Defaults to ""
.
TypeProperty: long-name
string
This property is a fully spelled-out name for the type. Defaults to
""
.
TypeProperty: short-name
string
This property is an abbreviated name of for the type. Defaults to
""
.
TypeProperty: generic-name
string
This property is like name
, but identifies the type less
specifically, and several types may have the same generic name. If no
generic names are defined, then the regular type names will be used.
This is useful when making abbreviated lists, so that related types get
counted together. Defaults to ""
.
As an example of the distinction between type names and generic type
name, the names of a automobile type might be "1965 Mustang"
,
"Mustang"
, and "M"
, while the generic name is
"auto"
. Then the interface could choose to display a parking lot
as containing either "4 auto"
or "2 Mustang 1 Edsel 1
Jeep"
.
Note that names specified as properties are strings only, and are not defined as evaluable symbols.
The interpretation of these properties is entirely up to each interface; see the appropriate interface documentation for details.
TypeProperty: image-name
str
This property is the name of the type's image. If undefined or unusable for some reason, the interface will display the type in some default manner, such as a solid-color square or a string.
For example, in X11, the name might be the name of a file in the usual
bitmap format, as produced by the bitmap program. The actual file
name is produced by appending ".b"
. (The situation in X is
actually more complicated than this.) See the interface documentation
for details on how the interface uses the image.
TypeProperty: color
str
This property is the name of the preferred color for this type. Both
normal color names and the strings "bg"
and "fg"
(meaning
"foreground color" and "background color") may be used. If the
image is in color, then this property has no effect. Defaults to
"fg"
.
TypeProperty: char
str
This property supplies a single character for this type (all characters
after the first one in str are ignored). Defaults to ""
.
UnitTypeProperty: generic-char
str
This property supplies a single generic character for this type (all
characters after the first one in str are ignored). If defined,
displays will use the generic character in preference to the char
for the unit type, in contexts where the exact type is not important
(such as in lists of occupant types). Defaults to ""
.
TypeProperty: help
string
This property is a brief (preferably one-line) description of the type.
Defaults to ""
.
TypeProperty: notes
strings...
This property is detailed documentation about the type. The formatting
of the strings is up to the interface, but in general each string is a
separate line, the string ""
indicates a line break, and two
""
in a row indicates a paragraph break. Defaults to ()
.
It may be that a set of types is larger than strictly necessary for a particular game. You can make any type unavailable, which means that irrespective of any other controls, that type cannot come into play during a game. You can also make it available only for particular turns.
TypeProperty: available
n
If the value of this property is greater than 0, then this type is
available in the game on or after turn n. If the value is less
than 0, then the type is available, but only until turn -n. If
the value is 0, then the type is never available. Defaults to 1
,
which means that the type is always available.
If a type becomes unavailable and there are units of that type in play, then they will vanish immediately.
It may occasionally be necessary to add new kinds of
information to a type.
For instance, new synthesis methods may require special data,
or an interface may be able to use extra hints to improve its display.
The extensions
property can be used to store this kind of data.
TypeProperty: extensions
properties...
This property is a catch-all for nonstandard type properties. Anything may appear here, but it will only be interpreted as much as needed, and unrecognized extensions will not be warned about (so if you misspell one, you won't find out).